package com.liuhazi.learnbymyself.controller;

import com.liuhazi.learnbymyself.common.model.Result;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;


@RestController
@RequestMapping("/open-api")
public class TestDemoController {

    @GetMapping("/business-1")
    public Result getA() {
        return new Result("状态码A", "成功", "null");
    }


    @GetMapping("/business-2")
    public Result getB() {
        throw new RuntimeException("模拟失败");
    }


}
